package com.practice;

import java.util.Scanner;

public class demo19 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入开始数");
        long a = sc.nextLong();
        System.out.println("请输入结束数");
        long b = sc.nextLong();
        //先求始端a前一个数的阶乘
        int jc = 1;
        for (long i = 1; i < a; i++) {
            jc *= i;
        }
        for (long i = a; i <= b; i++) {
            jc *= i;
            System.out.println(i + "的阶乘为：" + jc);
        }
    }
}
